//
//  UIColor+ColorFullTemplate.m
//  丁诚昊的外包项目(2016_V7宝)
//
//  Created by DimChum_Haul on 16/3/24.
//  Copyright © 2016年 沙罗双树831. All rights reserved.
//

#import "UIColor+ColorFullTemplate.h"

@implementation UIColor (ColorFullTemplate)
#pragma mark - Color & 色彩

+ (UIColor *)Heavy_ColorfulDay
{
    CGFloat hue = ( arc4random() % 256 / 256.0);  //  0.0 to 1.0
    CGFloat saturation = ( arc4random() % 128 / 256.0 ) + 0.25f;  //  0.5 to 1.0, away from white
    CGFloat brightness = ( arc4random() % 128 / 256.0 ) + 0.25;  //  0.5 to 1.0, away from black
    return [UIColor colorWithHue:hue
                      saturation:saturation
                      brightness:brightness
                           alpha:1];
}

+ (UIColor *)SpecRandomColor
{
    CGFloat hue = ( arc4random() % 256 / 256.0 );  //  0.0 to 1.0
    CGFloat saturation = ( arc4random() % 128 / 256.0 ) + 0.75;  //  0.5 to 1.0, away from white
    CGFloat brightness = ( arc4random() % 128 / 256.0 ) + 0.75;  //  0.5 to 1.0, away from black
    return [UIColor colorWithHue:hue
                      saturation:saturation
                      brightness:brightness
                           alpha:1];
}

+ (UIFont*) randomFontWithSize:(NSUInteger)size
{
    NSArray* fontFamily = [UIFont familyNames];
    unsigned int count = (unsigned int)fontFamily.count;
    UIFont *font = [UIFont fontWithName:fontFamily[arc4random_uniform(count)] size:size];
    return font;
}

+ (UIColor *) GLColor
{
    //102 91 169 顶部底部tabbar navibar背景色调
    return [UIColor colorWithRed:220/255.0f
                           green:41/255.0f
                            blue:75/255.0f
                           alpha:1.0f];
}

+ (UIColor* ) grayGrayColor
{
    return [UIColor colorWithRed:238/256.0f green:238/256.0f blue:242/256.0f alpha:1.0f];
}
@end
